package com.sunwayworld.basemodule.samplemanage.sample.service;

import com.alibaba.fastjson.JSONObject;
import com.sunwayworld.basemodule.samplemanage.sample.bean.BatchSampleStaticsDTO;
import com.sunwayworld.basemodule.samplemanage.sample.bean.LimsSampleBean;
import com.sunwayworld.framework.data.page.Page;
import com.sunwayworld.framework.mybatis.mapper.MapperParameter;
import com.sunwayworld.framework.restful.data.RestJsonWrapperBean;
import com.sunwayworld.framework.restful.data.RestValidationResultBean;
import com.sunwayworld.framework.support.auditable.service.GenericAuditableService;
import com.sunwayworld.framework.support.base.service.GenericService;
import com.sunwayworld.framework.support.choosable.service.GenericChoosableService;
import com.sunwayworld.framework.support.tree.service.GenericTreeService;
import com.sunwayworld.module.item.file.bean.CoreFileBean;

import java.util.List;

public interface LimsSampleService extends GenericService<LimsSampleBean, Long>, GenericChoosableService<LimsSampleBean, Long>, GenericTreeService<LimsSampleBean, Long> {


    void back(RestJsonWrapperBean wrapperBean);

    void destroy(RestJsonWrapperBean wrapperBean);

    Page<LimsSampleBean> selectHandleSample(Long handleId, RestJsonWrapperBean wrapper);

    Page<LimsSampleBean> selectExpiredSamples(RestJsonWrapperBean wrapperBean);

    JSONObject confirmSampleExpired(RestJsonWrapperBean jsonWrapperBean);

    JSONObject receiveSampleWarp(RestJsonWrapperBean jsonWrapperBean);

    JSONObject editSampleMulti(RestJsonWrapperBean jsonWrapperBean);

    JSONObject saveAbnormalHandle(RestJsonWrapperBean jsonWrapperBean);

    // 公式计算查样本相关信息
    List<LimsSampleBean> selectForFormula(List<Long> ids);

    Page<LimsSampleBean> selectForFormula(RestJsonWrapperBean wrapperBean);

    Page<LimsSampleBean> selectByParams(RestJsonWrapperBean wrapper);

    Long printSampleTag(RestJsonWrapperBean wrapper);

    Page<LimsSampleBean> selectSampleHandlesPagination(RestJsonWrapperBean wrapper);

    void receiveSubmit(RestJsonWrapperBean wrapperBean);

    void abnormalSubmit(RestJsonWrapperBean wrapperBean);

    void abnormalConfirm(RestJsonWrapperBean wrapperBean);

    Long scanCodeCheck(RestJsonWrapperBean wrapper);

    JSONObject uploadAttachmentMulti(RestJsonWrapperBean jsonWrapperBean);

    JSONObject getCourierData(RestJsonWrapperBean jsonWrapperBean);

    List<BatchSampleStaticsDTO> selectBatchSampleStaticsPage(String year);

    // 通过handleid查询关联的所有样本
    List<LimsSampleBean> selectHandleSample(Long handleId);

    // 通过参数查询流转单下的所有样本（与页面上查询使用同一个sql
    List<LimsSampleBean> selectSampleHandlesList(MapperParameter parameter);

    List<LimsSampleBean> selectListByParams(MapperParameter parameter);

    List<LimsSampleBean> selectSampleList(MapperParameter temp);

    Page<LimsSampleBean> selectTestMethodBySampleCode(RestJsonWrapperBean wrapper);

    Page<LimsSampleBean> selectBatchChooseSamplePagination(RestJsonWrapperBean wrapper);

    Long print(RestJsonWrapperBean jsonWrapperBean);

    RestValidationResultBean validateGeneratedSamplecode(Long id, String columnName, String columnValue);

    Page<LimsSampleBean> selectPassRate(RestJsonWrapperBean wrapper);
}
